/*!
\file
	DataTypeInfo.h
\brief
	Declaration of DataTypeInfo.
\details
\bug
	none
\todo
	node
\date
	January 20, 2008 - first version of the file.
	February 2, 2008 - added suport of data type manager.
	April 20, 2008 - added create_empty_classes parameter to get_data_types_poiters().
\author
	Copyright (C) 2008 Vadym Hulakov, mailto:hulakov@gmail.com. All rights reserved.
*/

#ifndef DATATYPEINFO_H
#define DATATYPEINFO_H

#include <string>
#include "ItemBase.h"

namespace ObjectModel
{
	class TypeHierarchy;

	//! Class that represents basic info about data type.
	class Type : public ItemBase
	{
	protected:
		//! @name Construction and destruction
		//@{
		Type(const wchar_t* name, const TypeHierarchy& manager, const wchar_t* description = 0)
		: ItemBase(name, description), _manager(manager)
		{
		}

		Type(const Type& t)
			: ItemBase(t.getName().c_str(), t.getDescription().c_str())
			, _manager(t._manager)
		{

		}

	private:
		Type& operator=(const Type&);

	public:
		//@}

		//! @name Virtual methods
		//@{
		//! Get size of the data type
		//! @return
		//!		Size of the basic type in bytes.
		virtual int getSize() const = 0;

		//! Determines is this basic data type
		//! @return
		//!		true if this is basic data type or false otherwise.
		virtual bool isBasic() const = 0;

		//@}

		//! @name Data Types Management
		//@{
	protected:
		//!	Data type manager associated with this type.
		const TypeHierarchy& _manager;
		//@}
	};
}

#endif // DATATYPEINFO_H
